package imoney.shared.exception;

import java.io.Serializable;

/**
 * Should be used to indicate when the position stored by a cookie is out of
 * date; but the person is still in the context, so there is no need for relogging.
 * A simple update of the cookie is expected.
 * @author Arnaud Peloquin
 *
 */
public class PositionOutOfDateException extends Exception implements Serializable {

	private static final long serialVersionUID = 21022013L;
	
	private int realPosition;
	
	public PositionOutOfDateException(int realPosition) {
		super();
		this.realPosition = realPosition;
	}
	
	public PositionOutOfDateException() {
		this(-42);
	}

	public int getRealPosition() {
		return realPosition;
	}
	
	public void setRealPosition(int realPosition) {
		this.realPosition = realPosition; 
	}

}
